import request from "@/libs/axios.js";

//2020.8.11 刚加的api
//根据阶段id查询用户（下拉框）
export function selectUserByStage(stageId) {
  return request({
    url: `api/admin/project/selectUserByStage/${stageId}`,
    method: "get",
  });
}
//获取阶段类型
export function getStageList() {
  return request({
    url: "/api/admin/verPlan/verPlanStageList",
    method: "get",
  });
}

//增加阶段类型
export function addStageType(data) {
  return request({
    url: "/api/admin/verPlan/verPlanStageAdd",
    method: "post",
    data,
  });
}

//删除阶段类型
export function deleteStageType(id) {
  return request({
    url: `/api/admin/verPlan/verPlanStageDel/${id}`,
    method: "DELETE",
  });
}

//修改阶段类型
export function editStageType(data) {
  return request({
    url: "/api/admin/verPlan/verPlanStageModify",
    method: "PUT",
    data,
  });
}

//查询员工列表
export function getStaffList(fid = 0) {
  return request({
    url: `/api/admin/project/getStaffList/${fid}`,
    method: "get",
  });
}

//根据用户查询参与的项目情况列表
export function getProjectInfoByUid(uid) {
  return request({
    url: `/api/admin/project/getProjectInfoByUid/${uid}`,
    method: "get",
  });
}

//分页查询动态列表
export function opetateLogList(data) {
  return request({
    url: `/api/admin/operate/log/opetateLogList/${data.pn}/${data.ps}`,
    method: "post",
    data: {
      beginTime: data.beginTime,
      endTime: data.endTime,
      keyword: data.keyword,
    },
  });
}
